package test;

/**
 * @author oldliu
 * @since 1.0
 */
public class StaticA {
    static int[]ar=new int[20];
    static {//匿名静态块,类被加载的时候调用了，只用一次
        System.out.println("This is A");
        ar[0]=100;
        ar[1]=50;
    }
    //匿名构造块，在每个构造方法之前调用
    {
        System.out.println("O Yeah");
        System.out.println("............................");
    }
    public StaticA(){
        System.out.println("无参构造");
    }
    public StaticA(int i){
        System.out.println("一个int");
    }
    public StaticA(int i,double d){
        System.out.println("一个int 一个double");
    }
    public StaticA(int i,int j){
        System.out.println("2个int");
    }
}
